﻿IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[esf_files].[P_FileReferenceSetIsEnabled]') AND type in (N'P', N'PC'))
	DROP PROCEDURE [esf_files].P_FileReferenceSetIsEnabled
GO


CREATE PROCEDURE esf_files.P_FileReferenceSetIsEnabled
	@pIsEnabledUserAlias VARCHAR (20),
	@pIsEnabled BIT,
	@pID INT
AS
	UPDATE 
		[esf_files].[FileReference] 
	SET 
		IsEnabled = @pIsEnabled,
		IsEnabledUserAlias = @pIsEnabledUserAlias,
		IsEnabledDateTime = GETDATE ()
	WHERE
		ID = @pID